package com.asset.dispoal.poi.documentation.service;

import com.asset.dispoal.poi.documentation.api.DocumentationService;
import com.asset.dispoal.poi.documentation.dto.CaseDocumentationRequest;
import com.asset.dispoal.poi.documentation.dto.DataTableDocumentationRequest;
import com.asset.dispoal.poi.documentation.dto.DocumentationRequest;
import com.asset.dispoal.poi.documentation.dto.PlaintiffInfoRequest;
import com.asset.dispoal.poi.documentation.service.commom.DownloadCaseDocumentCommand;
import com.asset.dispoal.poi.documentation.service.commom.DownloadDataTableCommand;
import com.asset.dispoal.poi.documentation.service.commom.DownloadDocumentCommand;
import com.asset.dispoal.poi.documentation.service.commom.DownloadPlaintiffInfoCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.mhuang.pacebox.springboot.protocol.Result;

/**
 * @author qr
 * @date 2022/5/6$
 */
@Service
public class DocumentationServiceImpl implements DocumentationService {

    @Autowired
    DownloadDocumentCommand downloadDocumentCommand;

    @Autowired
    DownloadCaseDocumentCommand downloadCaseDocumentCommand;

    @Autowired
    DownloadDataTableCommand downloadDataTableCommand;

    @Autowired
    DownloadPlaintiffInfoCommand downloadPlaintiffInfoCommand;

    @Override
    public Result downloadDocument(DocumentationRequest documentationRequest) {
        return downloadDocumentCommand.execute(documentationRequest);
    }

    @Override
    public Result downloadCaseDocument(CaseDocumentationRequest request) {
        return downloadCaseDocumentCommand.execute(request);
    }

    @Override
    public Result downloadDataTable(DataTableDocumentationRequest request) {
        return downloadDataTableCommand.execute(request);
    }

    @Override
    public Result downloadPlaintiffInfo(PlaintiffInfoRequest request) {
        return downloadPlaintiffInfoCommand.execute(request);
    }
}
